<?php
namespace app\admin\validate;
use think\facade\Db;
use think\Validate;

class SystemMenu extends Validate
{

    protected $rule=[
        'name'    =>'require',
        'pid'    =>'require',
    ];
    protected $message = [
        'name.require'    => '请输入节点名称',
        'pid.require'    => '请选择父节点',
    ];
    protected $scene = [
        'add' =>['name','pid'],
        'edit'=>['name','pid','id'],
        'del' =>['id'],
    ];

}